package yf.mall.dao;

import com.yf.dao.BaseDao;
import yf.mall.entity.SignEntity;
import yf.mall.vo.SignVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 报名Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Mon Oct 21 08:39:58 CST 2019
 */
@Mapper
public interface SignDao extends BaseDao<SignEntity> {

    /**

        List<SignVo> queryListVo(SignVo signVo);

        SignVo getVo(Long id);

    **/

    //一个券只能报一个没开课的名
    SignEntity findByCardIdNotStatus(@Param("cardId") Long cardId, @Param("status") int status);

    //找打某个课的所有报名
    List<SignEntity> findByCourseId(Long courseId);

    //找到下级或者@Transactional(rollbackFor = Exception.class)的报名
    List<SignVo> findByUserId(Long userId);
}
